Scalar const c0 = pow(q.z(), 2);
Scalar const c1 = 1.0/q.w();
Scalar const c2 = pow(q.x(), 2);
Scalar const c3 = pow(q.y(), 2);
Scalar const c4 = c0 + c2 + c3;
Scalar const c5 = sqrt(c4);
Scalar const c6 = atan(c1*c5);
Scalar const c7 = pow(c6, 2);
Scalar const c8 = 8*c7;
Scalar const c9 = pow(c4, -2);
Scalar const c10 = c9*q.x();
Scalar const c11 = c10*c8;
Scalar const c12 = c0*c11;
Scalar const c13 = c6/pow(c4, 3.0/2.0);
Scalar const c14 = 8*c13;
Scalar const c15 = pow(q.w(), -2);
Scalar const c16 = 1.0/(c15*c4 + 1);
Scalar const c17 = c1*c16;
Scalar const c18 = c17*q.x();
Scalar const c19 = c0*c18;
Scalar const c20 = c14*c19;
Scalar const c21 = c12 - c20;
Scalar const c22 = c11*c3;
Scalar const c23 = c14*c3;
Scalar const c24 = c18*c23;
Scalar const c25 = c22 - c24;
Scalar const c26 = c21 + c25;
Scalar const c27 = 4*c7;
Scalar const c28 = 1.0/c4;
Scalar const c29 = c2*c28;
Scalar const c30 = c27*c29;
Scalar const c31 = c27*c28;
Scalar const c32 = c3*c31;
Scalar const c33 = c0*c31;
Scalar const c34 = c30 + c32 + c33;
Scalar const c35 = 1.0/c34;
Scalar const c36 = sqrt(c34);
Scalar const c37 = 0.5*c36;
Scalar const c38 = sin(c37);
Scalar const c39 = cos(c37);
Scalar const c40 = (1.0/2.0)*c39/c38;
Scalar const c41 = -c36*c40 + 1;
Scalar const c42 = c35*c41;
Scalar const c43 = c28*q.x();
Scalar const c44 = pow(q.x(), 3);
Scalar const c45 = c44*c9;
Scalar const c46 = c17*c44;
Scalar const c47 = c13*c46;
Scalar const c48 = -c43*c8 + c45*c8 - 8*c47;
Scalar const c49 = c26 + c48;
Scalar const c50 = -c32;
Scalar const c51 = -c33;
Scalar const c52 = c50 + c51;
Scalar const c53 = c41/pow(c34, 2);
Scalar const c54 = c52*c53;
Scalar const c55 = 1.0*c7;
Scalar const c56 = c10*c55;
Scalar const c57 = 1.0*c13;
Scalar const c58 = 1.0*c3;
Scalar const c59 = c13*c58;
Scalar const c60 = c0*c57;
Scalar const c61 = c31*q.x();
Scalar const c62 = c10*c27;
Scalar const c63 = 4*c13;
Scalar const c64 = c3*c63;
Scalar const c65 = -c0*c62 + c18*c64 + c19*c63 - c27*c45 - c3*c62 + 4*c47 + c61;
Scalar const c66 = 0.25*pow(c39, 2)/pow(c38, 2);
Scalar const c67 = c40/c36;
Scalar const c68 = -c0*c56 + c18*c59 + c18*c60 - c3*c56 + c43*c55 - c45*c55 + c46*c57 + c65*c66 - c65*c67;
Scalar const c69 = c35*c52;
Scalar const c70 = c57*q.x();
Scalar const c71 = c70*q.z();
Scalar const c72 = c31*q.y();
Scalar const c73 = c42*c72;
Scalar const c74 = c17*c43;
Scalar const c75 = 1.0*c74;
Scalar const c76 = c75*q.z();
Scalar const c77 = -c71 + c73 + c76;
Scalar const c78 = c9*q.y();
Scalar const c79 = c2*c78;
Scalar const c80 = c79*c8;
Scalar const c81 = c35*c61;
Scalar const c82 = c68*c81;
Scalar const c83 = c53*c61;
Scalar const c84 = c49*c83;
Scalar const c85 = c17*q.y();
Scalar const c86 = c2*c85;
Scalar const c87 = c14*c86;
Scalar const c88 = -c42*c80 + c42*c87 + c82*q.y() + c84*q.y();
Scalar const c89 = c70*q.y();
Scalar const c90 = c31*q.z();
Scalar const c91 = c42*c90;
Scalar const c92 = c75*q.y();
Scalar const c93 = c89 + c91 - c92;
Scalar const c94 = c9*q.z();
Scalar const c95 = c2*c94;
Scalar const c96 = c8*c95;
Scalar const c97 = c17*q.z();
Scalar const c98 = c2*c97;
Scalar const c99 = c14*c98;
Scalar const c100 = -c42*c96 + c42*c99 + c82*q.z() + c84*q.z();
Scalar const c101 = c0*c78;
Scalar const c102 = c101*c8;
Scalar const c103 = c0*c85;
Scalar const c104 = c103*c14;
Scalar const c105 = c102 - c104;
Scalar const c106 = c28*q.y();
Scalar const c107 = pow(q.y(), 3);
Scalar const c108 = c107*c9;
Scalar const c109 = c107*c17;
Scalar const c110 = c109*c13;
Scalar const c111 = -c106*c8 + c108*c8 - 8*c110;
Scalar const c112 = c80 - c87;
Scalar const c113 = c105 + c112;
Scalar const c114 = c111 + c113;
Scalar const c115 = c2*c57;
Scalar const c116 = -c101*c27 + c103*c63 - c108*c27 + 4*c110 - c27*c79 + c63*c86 + c72;
Scalar const c117 = -c101*c55 + c106*c55 - c108*c55 + c109*c57 + c115*c85 + c116*c66 - c116*c67 - c55*c79 + c60*c85;
Scalar const c118 = c17*c28;
Scalar const c119 = c118*c58;
Scalar const c120 = c6/c5;
Scalar const c121 = 1.0*c120;
Scalar const c122 = q.y()*q.z();
Scalar const c123 = c122*c42;
Scalar const c124 = -c11*c123 + c123*c14*c18;
Scalar const c125 = -c121 + c124;
Scalar const c126 = c117*c81;
Scalar const c127 = c114*c83;
Scalar const c128 = c126*q.z() + c127*q.z();
Scalar const c129 = c122*c57;
Scalar const c130 = c42*c61;
Scalar const c131 = c106*c97;
Scalar const c132 = 1.0*c131;
Scalar const c133 = -c129 + c130 + c132;
Scalar const c134 = c126*q.y() + c127*q.y() - c22*c42 + c24*c42;
Scalar const c135 = c3*c94;
Scalar const c136 = c135*c8;
Scalar const c137 = c23*c97;
Scalar const c138 = c136 - c137;
Scalar const c139 = c28*q.z();
Scalar const c140 = pow(q.z(), 3);
Scalar const c141 = c140*c9;
Scalar const c142 = c140*c17;
Scalar const c143 = -c139*c8 - c14*c142 + c141*c8;
Scalar const c144 = c96 - c99;
Scalar const c145 = c138 + c144;
Scalar const c146 = c143 + c145;
Scalar const c147 = -c135*c27 - c141*c27 + c142*c63 - c27*c95 + c63*c98 + c64*c97 + c90;
Scalar const c148 = c115*c97 - c135*c55 + c139*c55 - c141*c55 + c142*c57 + c147*c66 - c147*c67 - c55*c95 + c59*c97;
Scalar const c149 = c0*c118;
Scalar const c150 = 1.0*c149;
Scalar const c151 = c121 + c124;
Scalar const c152 = c148*c81;
Scalar const c153 = c146*c83;
Scalar const c154 = c152*q.y() + c153*q.y();
Scalar const c155 = c129 + c130 - c132;
Scalar const c156 = -c12*c42 + c152*q.z() + c153*q.z() + c20*c42;
Scalar const c157 = c15*c16;
Scalar const c158 = 1.0*c157;
Scalar const c159 = c158*q.z();
Scalar const c160 = c121*c157;
Scalar const c161 = c120*c157;
Scalar const c162 = 4*c161;
Scalar const c163 = -c0*c162 - c162*c2 - c162*c3;
Scalar const c164 = -c0*c160 - c160*c2 - c160*c3 + c163*c66 - c163*c67;
Scalar const c165 = c164*c81;
Scalar const c166 = 8*c161;
Scalar const c167 = c166*c2;
Scalar const c168 = c166*c3;
Scalar const c169 = c0*c166;
Scalar const c170 = c168 + c169;
Scalar const c171 = c167 + c170;
Scalar const c172 = c171*c83;
Scalar const c173 = c166*c42*q.x();
Scalar const c174 = c165*q.y() + c172*q.y() - c173*q.y();
Scalar const c175 = c158*q.y();
Scalar const c176 = c165*q.z() + c172*q.z() - c173*q.z();
Scalar const c177 = c121*q.z();
Scalar const c178 = c130*q.y();
Scalar const c179 = c121*q.y();
Scalar const c180 = c130*q.z();
Scalar const c181 = -c30;
Scalar const c182 = c181 + c51;
Scalar const c183 = c182*c53;
Scalar const c184 = c182*c35;
Scalar const c185 = c17*c29;
Scalar const c186 = 1.0*c185;
Scalar const c187 = c72*q.z();
Scalar const c188 = c187*c35;
Scalar const c189 = c187*c53;
Scalar const c190 = c188*c68 + c189*c49;
Scalar const c191 = c71 + c73 - c76;
Scalar const c192 = -c89 + c91 + c92;
Scalar const c193 = c114*c189 + c117*c188 - c136*c42 + c137*c42;
Scalar const c194 = -c102*c42 + c104*c42 + c146*c189 + c148*c188;
Scalar const c195 = c158*q.x();
Scalar const c196 = -c123*c166 + c164*c188 + c171*c189;
Scalar const c197 = c121*q.x();
Scalar const c198 = c73*q.z();
Scalar const c199 = c181 + c50;
Scalar const c200 = c199*c53;
Scalar const c201 = c199*c35;
Scalar const c202 = 2*c120;
Scalar const c203 = 2*c13;
Scalar const c204 = c203*q.x();
Scalar const c205 = 2*c74;
Scalar const c206 = -c204*q.y() + c205*q.y();
Scalar const c207 = -c204*q.z() + c205*q.z();
Scalar const c208 = 2*c157;
Scalar const c209 = -c122*c203 + 2*c131;
result[0] = t[0]*(c26*c42 + c49*c54 + c68*c69) + t[1]*(c77 + c88) + t[2]*(c100 + c93);
result[1] = t[0]*(c114*c54 + c117*c69 + c42*(c105 + c111)) + t[1]*(c133 + c134) + t[2]*(-c119 + c125 + c128 + c59);
result[2] = t[0]*(c146*c54 + c148*c69 + c42*(c138 + c143)) + t[1]*(c150 + c151 + c154 - c60) + t[2]*(c155 + c156);
result[3] = t[0]*(c164*c69 + c170*c42 + c171*c54) + t[1]*(-c159 + c174) + t[2]*(c175 + c176);
result[4] = c42*c52 + 1;
result[5] = c177 + c178;
result[6] = -c179 + c180;
result[7] = t[0]*(c191 + c88) + t[1]*(c183*c49 + c184*c68 + c42*(c21 + c48)) + t[2]*(-c115 + c151 + c186 + c190);
result[8] = t[0]*(c134 + c155) + t[1]*(c113*c42 + c114*c183 + c117*c184) + t[2]*(c192 + c193);
result[9] = t[0]*(c125 - c150 + c154 + c60) + t[1]*(c146*c183 + c148*c184 + c42*(c143 + c144)) + t[2]*(c194 + c77);
result[10] = t[0]*(c159 + c174) + t[1]*(c164*c184 + c171*c183 + c42*(c167 + c169)) + t[2]*(-c195 + c196);
result[11] = -c177 + c178;
result[12] = c182*c42 + 1;
result[13] = c197 + c198;
result[14] = t[0]*(c100 + c192) + t[1]*(c115 + c125 - c186 + c190) + t[2]*(c200*c49 + c201*c68 + c42*(c25 + c48));
result[15] = t[0]*(c119 + c128 + c151 - c59) + t[1]*(c193 + c93) + t[2]*(c114*c200 + c117*c201 + c42*(c111 + c112));
result[16] = t[0]*(c133 + c156) + t[1]*(c191 + c194) + t[2]*(c145*c42 + c146*c200 + c148*c201);
result[17] = t[0]*(-c175 + c176) + t[1]*(c195 + c196) + t[2]*(c164*c201 + c171*c200 + c42*(c167 + c168));
result[18] = c179 + c180;
result[19] = -c197 + c198;
result[20] = c199*c42 + 1;
result[21] = 2*c185 - c2*c203 + c202;
result[22] = c206;
result[23] = c207;
result[24] = -c208*q.x();
result[25] = 0;
result[26] = 0;
result[27] = 0;
result[28] = c206;
result[29] = 2*c118*c3 + c202 - c203*c3;
result[30] = c209;
result[31] = -c208*q.y();
result[32] = 0;
result[33] = 0;
result[34] = 0;
result[35] = c207;
result[36] = c209;
result[37] = -c0*c203 + 2*c149 + c202;
result[38] = -c208*q.z();
result[39] = 0;
result[40] = 0;
result[41] = 0;
